class Person {
  //一个类只能有一个构造函数
  constructor(name, age, address) {
    this.name = name
    this.age = age
    this.adress = address
  }
  
  //静态方法,放到Person对象内部
  static createPerson() {
  }
  
  //方法实际上是放到了Person的原型上
  eating() {
  }
  
  running() {
  }
}

console.log(Person.prototype)
console.log(Person.prototype.__proto__)
console.log(Person.prototype.constructor)

//new的时候同样要执行5步操作
var p = new Person('li', 10, 'ddj')
console.log(p.__proto__ === Person.prototype) //true
console.log(typeof Person) //function
console.log(Object.getOwnPropertyDescriptors(Person.prototype))
console.log('===', Object.getOwnPropertyDescriptors(Person))
